﻿<script type="text/javascript">
    //This file belongs to the Hostblock IE plugin
    //Distributed under the Microsoft Public License:
    //http://hostblock.codeplex.com/license
    //Made by: Kirill Illenseer
    //Contact: Zam.K@live.de
    //Web: http://hostblock.codeplex.com
    if (typeof String.prototype.startsWith != 'function') {
        String.prototype.startsWith = function (str) {
            return this.indexOf(str) == 0;
        };
    }
    is = external.menuArguments.window.event.srcElement.src;
    du = external.menuArguments.document.URL;
    if (is != null) { link = is } else { link = du };
    if (link.startsWith("javascript:") || link.startsWith("localhost") || link.startsWith("undefined")) {
        alert(link + " is not a blockable URL");
    }
    else {
        var shell = new ActiveXObject("WScript.Shell");
        shell.run("\"%ProgramFiles%\\Internet Explorer\\PLUGINS\\Hostblock\\Hostblock.exe \"" + link);
    }
</script>